package gipfProject.games.tzaar.gui;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JPanel;

import gipfProject.games.tzaar.data.TzaarData;
import gipfProject.games.tzaar.engine.TzaarEngine;
import gipfProject.games.tzaar.gui.BoardUI;
import gipfProject.games.tzaar.gui.TzaarMenu;
import gipfProject.tools.ResourceLoader;

public class TzaarUI extends JPanel {
	private TzaarData gameState;
	private TzaarEngine engine;
	
	BoardUI boardUI;
	
	public TzaarUI(JFrame parentFrame, TzaarData gameState, TzaarEngine engine){
		this.gameState = gameState;
		this.engine = engine;
		
		// Load our resource files
		ResourceLoader images = new ResourceLoader("tzaar");

		// Set the frame icon to an image loaded from a file.
		parentFrame.setIconImage(images.getResource("TzaarIcon"));
		
		// Create the menu
		//JMenuBar menu = new TzaarMenu(this,engine,parentFrame);

		// Add the menu to the window
		//parentFrame.setJMenuBar(menu);

		// We will manually layout
		setLayout(null);

		// Set the window size
		setPreferredSize(new Dimension(640, 640));

		// Set the window's background color
		setBackground(TzaarColors.windowBackground);

		// Displays the board
		boardUI = new BoardUI(images, gameState, engine, this);
		add(boardUI);

		//Layout the display
		boardUI.setBounds        (10, 10, 380, 460);	
	}
}
